pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    // fib[i] = fib[i-1] + fib[i-2]
    // fib[0] = 0, fib[1] = 1
    let mut a = 0;
    let mut b = 1;
    let mut sum = 0;
    while b < threshold {
        if b % 2 != 0 {
            sum += b;
        }
        let next_fib = a + b;
        a = b;
        b = next_fib;
        
    }
    sum
}
